<?php

namespace App\Http\Controllers\Miniapp;

use App\Http\Controllers\MiniappController;
use App\Models\miniapp\User;

class UserController extends MiniappController
{
    /**
     * 获取用户信息
     */
    public function show()
    {
        $user = User::with('address')->find($this->uid);
        return $this->successful($user);
    }

    /**
     * 退出登录
     */
    public function logout()
    {
        auth('miniapp')->logout();
        return $this->successful('账号已退出');
    }
}
